package com.example.web.swagger;

import com.example.model.Department;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@Tag(name= "部门接口")
public interface IDepartmentController {

    @Operation(summary = "部门列表", description = "查询所有的部门信息", method = "GET")
    @GetMapping(path = "/departments/list",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE
    )
    public List<Department> list();

    @Operation(summary = "单个部门信息", description = "根据 ID 查询指定的部门信息", method = "GET")
    @GetMapping(path = "/departments/get",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE
    )
    public Department getDepartment(Long id);

}
